package com.csxh.bookstore.dao;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import com.csxh.bookstore.bean.User;


public class UserDaoImpl implements UserDao {

	private SqlSession session;
	private UserDao dao;
	public UserDaoImpl(SqlSession session) {
		this.session=session;
		this.dao=this.session.getMapper(UserDao.class);
	}

	@Override
	public int save(User user) {
		
		return dao.save(user);
		
	}

	@Override
	public User find(int id) {
		return dao.find(id);
	}
	
	
}
